
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>测试方案 · Passport业务手册</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="xiajie <xiajie01@baidu.com>">
        
        
    
    <link rel="stylesheet" href="../../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-multipart/multipart.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-codeblock-filename/block.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-page-footer-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-prism/prism-okaidia.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-custom-js-css/03c70a23567f2990c05f5cb8c64400a2-main.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-custom-js-css/27b4a027a84f513ce71206e15df835dc-folding-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="test-result.html" />
    
    
    <link rel="prev" href="deploy.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
    

    

    
        
        <li class="header">[第一章] 开发指南</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../../">
            
                <a href="../../../">
            
                    
                        <b>1.1.</b>
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../../guides/develop/awareness.html">
            
                <a href="../../../guides/develop/awareness.html">
            
                    
                        <b>1.2.</b>
                    
                    新人必读
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../../guides/develop/doc.html">
            
                <a href="../../../guides/develop/doc.html">
            
                    
                        <b>1.3.</b>
                    
                    文档撰写
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../../../guides/services.html">
            
                <a href="../../../guides/services.html">
            
                    
                        <b>1.4.</b>
                    
                    流量接入介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../../../guides/services/shifen.html">
            
                <a href="../../../guides/services/shifen.html">
            
                    
                        <b>1.4.1.</b>
                    
                    灵渠(shifen平台)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../../../guides/services/bgw.html">
            
                <a href="../../../guides/services/bgw.html">
            
                    
                        <b>1.4.2.</b>
                    
                    BGW
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../../../guides/services/bfe.html">
            
                <a href="../../../guides/services/bfe.html">
            
                    
                        <b>1.4.3.</b>
                    
                    BFE
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../../../guides/passport.html">
            
                <a href="../../../guides/passport.html">
            
                    
                        <b>1.5.</b>
                    
                    Pass技术架构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../../../guides/passport/dbgate.html">
            
                <a href="../../../guides/passport/dbgate.html">
            
                    
                        <b>1.5.1.</b>
                    
                    DBGATE
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../../../guides/passport/session.html">
            
                <a href="../../../guides/passport/session.html">
            
                    
                        <b>1.5.2.</b>
                    
                    SESSION
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                        <b>1.6.</b>
                    
                    开发环境配置
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../../../guides/environment/instances.html">
            
                <a href="../../../guides/environment/instances.html">
            
                    
                        <b>1.6.1.</b>
                    
                    开发机实例创建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../../../guides/environment/server_tool.html">
            
                <a href="../../../guides/environment/server_tool.html">
            
                    
                        <b>1.6.2.</b>
                    
                    开发机配套工具
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../../../guides/environment/tool.html">
            
                <a href="../../../guides/environment/tool.html">
            
                    
                        <b>1.6.3.</b>
                    
                    本地常用工具
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">[第二章] 业务项目</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../../experiment/">
            
                <a href="../../experiment/">
            
                    
                        <b>2.1.</b>
                    
                    分层实验平台
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="../../experiment/concept.html">
            
                <a href="../../experiment/concept.html">
            
                    
                        <b>2.1.1.</b>
                    
                    基本概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="../../experiment/concept_parse.html">
            
                <a href="../../experiment/concept_parse.html">
            
                    
                        <b>2.1.2.</b>
                    
                    概念剖析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="../../experiment/quick_start.html">
            
                <a href="../../experiment/quick_start.html">
            
                    
                        <b>2.1.3.</b>
                    
                    快速开始
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.3.1" data-path="../../experiment/quick_start_experiment.html">
            
                <a href="../../experiment/quick_start_experiment.html">
            
                    
                        <b>2.1.3.1.</b>
                    
                    实验创建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.2" data-path="../../experiment/quick_start_usage.html">
            
                <a href="../../experiment/quick_start_usage.html">
            
                    
                        <b>2.1.3.2.</b>
                    
                    业务层应用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.3" data-path="../../experiment/quick_start_chart.html">
            
                <a href="../../experiment/quick_start_chart.html">
            
                    
                        <b>2.1.3.3.</b>
                    
                    报表查询
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.1.4" >
            
                <span>
            
                    
                        <b>2.1.4.</b>
                    
                    实现机制
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.4.1" data-path="../../experiment/implement_platform.html">
            
                <a href="../../experiment/implement_platform.html">
            
                    
                        <b>2.1.4.1.</b>
                    
                    实验平台
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.2" data-path="../../experiment/implement_process.html">
            
                <a href="../../experiment/implement_process.html">
            
                    
                        <b>2.1.4.2.</b>
                    
                    实验流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.3" data-path="../../experiment/implement_sdk.html">
            
                <a href="../../experiment/implement_sdk.html">
            
                    
                        <b>2.1.4.3.</b>
                    
                    SDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.4" data-path="../../experiment/implement_expression.html">
            
                <a href="../../experiment/implement_expression.html">
            
                    
                        <b>2.1.4.4.</b>
                    
                    表达式执行器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.5" data-path="../../experiment/implement_chart.html">
            
                <a href="../../experiment/implement_chart.html">
            
                    
                        <b>2.1.4.5.</b>
                    
                    通用报表
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="../../experiment/cases.html">
            
                <a href="../../experiment/cases.html">
            
                    
                        <b>2.1.5.</b>
                    
                    应用案例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="../../experiment/reference.html">
            
                <a href="../../experiment/reference.html">
            
                    
                        <b>2.1.6.</b>
                    
                    参考资料
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../../auth-widget/">
            
                <a href="../../auth-widget/">
            
                    
                        <b>2.2.</b>
                    
                    验证控件重构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" >
            
                <span>
            
                    
                        <b>2.2.1.</b>
                    
                    当前现状
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1.1" data-path="../../auth-widget/current/authtoken.html">
            
                <a href="../../auth-widget/current/authtoken.html">
            
                    
                        <b>2.2.1.1.</b>
                    
                    初始化阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.2" data-path="../../auth-widget/current/render.html">
            
                <a href="../../auth-widget/current/render.html">
            
                    
                        <b>2.2.1.2.</b>
                    
                    渲染阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.3" data-path="../../auth-widget/current/check.html">
            
                <a href="../../auth-widget/current/check.html">
            
                    
                        <b>2.2.1.3.</b>
                    
                    验证阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.4" data-path="../../auth-widget/current/use.html">
            
                <a href="../../auth-widget/current/use.html">
            
                    
                        <b>2.2.1.4.</b>
                    
                    使用阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.5" data-path="../../auth-widget/current/now.html">
            
                <a href="../../auth-widget/current/now.html">
            
                    
                        <b>2.2.1.5.</b>
                    
                    使用场景
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="../../auth-widget/refactor.html">
            
                <a href="../../auth-widget/refactor.html">
            
                    
                        <b>2.2.2.</b>
                    
                    重构实现
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.2.1" data-path="../../auth-widget/refactor/context.html">
            
                <a href="../../auth-widget/refactor/context.html">
            
                    
                        <b>2.2.2.1.</b>
                    
                    验证控件上下文
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.2.2" data-path="../../auth-widget/refactor/interface.html">
            
                <a href="../../auth-widget/refactor/interface.html">
            
                    
                        <b>2.2.2.2.</b>
                    
                    验证控件抽象
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.2.3" data-path="../../auth-widget/refactor/mobile.html">
            
                <a href="../../auth-widget/refactor/mobile.html">
            
                    
                        <b>2.2.2.3.</b>
                    
                    手机验证
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.2.4" data-path="../../auth-widget/refactor/email.html">
            
                <a href="../../auth-widget/refactor/email.html">
            
                    
                        <b>2.2.2.4.</b>
                    
                    邮箱验证
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.2.5" data-path="../../auth-widget/refactor/facematch.html">
            
                <a href="../../auth-widget/refactor/facematch.html">
            
                    
                        <b>2.2.2.5.</b>
                    
                    刷脸验证
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.3" >
            
                <span>
            
                    
                        <b>2.2.3.</b>
                    
                    新版使用
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.3.1" data-path="../../auth-widget/new/authtoken.html">
            
                <a href="../../auth-widget/new/authtoken.html">
            
                    
                        <b>2.2.3.1.</b>
                    
                    初始化阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.2" data-path="../../auth-widget/new/render.html">
            
                <a href="../../auth-widget/new/render.html">
            
                    
                        <b>2.2.3.2.</b>
                    
                    渲染阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.3" data-path="../../auth-widget/new/check.html">
            
                <a href="../../auth-widget/new/check.html">
            
                    
                        <b>2.2.3.3.</b>
                    
                    验证阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.4" data-path="../../auth-widget/new/use.html">
            
                <a href="../../auth-widget/new/use.html">
            
                    
                        <b>2.2.3.4.</b>
                    
                    使用阶段
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="../../mobile-refactor/">
            
                <a href="../../mobile-refactor/">
            
                    
                        <b>2.3.</b>
                    
                    联系手机
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.3.1" data-path="../../mobile-refactor/ppui.html">
            
                <a href="../../mobile-refactor/ppui.html">
            
                    
                        <b>2.3.1.</b>
                    
                    业务层
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.2" data-path="../../mobile-refactor/dbgate.html">
            
                <a href="../../mobile-refactor/dbgate.html">
            
                    
                        <b>2.3.2.</b>
                    
                    后端
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.3" data-path="../../mobile-refactor/plan.html">
            
                <a href="../../mobile-refactor/plan.html">
            
                    
                        <b>2.3.3.</b>
                    
                    开发方案
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="./">
            
                <a href="./">
            
                    
                        <b>2.4.</b>
                    
                    头像迁移ORP
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="evaluate.html">
            
                <a href="evaluate.html">
            
                    
                        <b>2.4.1.</b>
                    
                    流量评估
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.2" data-path="deploy.html">
            
                <a href="deploy.html">
            
                    
                        <b>2.4.2.</b>
                    
                    服务部署
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="2.4.3" data-path="test.html">
            
                <a href="test.html">
            
                    
                        <b>2.4.3.</b>
                    
                    测试方案
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.4" data-path="test-result.html">
            
                <a href="test-result.html">
            
                    
                        <b>2.4.4.</b>
                    
                    测试结论
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.5" data-path="bug.html">
            
                <a href="bug.html">
            
                    
                        <b>2.4.5.</b>
                    
                    BUG收集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.6" data-path="service.html">
            
                <a href="service.html">
            
                    
                        <b>2.4.6.</b>
                    
                    依赖服务梳理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.7" data-path="monitor.html">
            
                <a href="monitor.html">
            
                    
                        <b>2.4.7.</b>
                    
                    监控规则梳理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.8" data-path="plan.html">
            
                <a href="plan.html">
            
                    
                        <b>2.4.8.</b>
                    
                    计划排期
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="../../experiment/trace/">
            
                <a href="../../experiment/trace/">
            
                    
                        <b>2.5.</b>
                    
                    TraceID机制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.1" data-path="../../experiment/trace/concept.html">
            
                <a href="../../experiment/trace/concept.html">
            
                    
                        <b>2.5.1.</b>
                    
                    基本概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2" >
            
                <span>
            
                    
                        <b>2.5.2.</b>
                    
                    实现机制
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.2.1" data-path="../../experiment/trace/trace_id.html">
            
                <a href="../../experiment/trace/trace_id.html">
            
                    
                        <b>2.5.2.1.</b>
                    
                    TraceID及管理器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.2" data-path="../../experiment/trace/flow_id.html">
            
                <a href="../../experiment/trace/flow_id.html">
            
                    
                        <b>2.5.2.2.</b>
                    
                    流程定义
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.3" data-path="../../experiment/trace/flow_handle.html">
            
                <a href="../../experiment/trace/flow_handle.html">
            
                    
                        <b>2.5.2.3.</b>
                    
                    流程处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.4" data-path="../../experiment/trace/exp_append_trace_id.html">
            
                <a href="../../experiment/trace/exp_append_trace_id.html">
            
                    
                        <b>2.5.2.4.</b>
                    
                    小流量实验
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.5" data-path="../../experiment/trace/trace_id_transfer.html">
            
                <a href="../../experiment/trace/trace_id_transfer.html">
            
                    
                        <b>2.5.2.5.</b>
                    
                    TraceID传递
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.2.5.1" data-path="../../experiment/trace/trace_id_transfer_ppui.html">
            
                <a href="../../experiment/trace/trace_id_transfer_ppui.html">
            
                    
                        <b>2.5.2.5.1.</b>
                    
                    PPUI
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.5.2" data-path="../../experiment/trace/trace_id_transfer_fe.html">
            
                <a href="../../experiment/trace/trace_id_transfer_fe.html">
            
                    
                        <b>2.5.2.5.2.</b>
                    
                    FE
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.5.3" data-path="../../experiment/trace/trace_id_transfer_na.html">
            
                <a href="../../experiment/trace/trace_id_transfer_na.html">
            
                    
                        <b>2.5.2.5.3.</b>
                    
                    NA端
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5.2.6" data-path="../../experiment/trace/log.html">
            
                <a href="../../experiment/trace/log.html">
            
                    
                        <b>2.5.2.6.</b>
                    
                    日志记录
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="../../face-cluster/">
            
                <a href="../../face-cluster/">
            
                    
                        <b>2.6.</b>
                    
                    人脸聚类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.6.1" >
            
                <span>
            
                    
                        <b>2.6.1.</b>
                    
                    存量聚类
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.6.1.1" data-path="../../face-cluster/clustering/feature.html">
            
                <a href="../../face-cluster/clustering/feature.html">
            
                    
                        <b>2.6.1.1.</b>
                    
                    特征提取
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.1.2" data-path="../../face-cluster/clustering/cluster.html">
            
                <a href="../../face-cluster/clustering/cluster.html">
            
                    
                        <b>2.6.1.2.</b>
                    
                    聚类输出
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6.2" data-path="../../face-cluster/face.html">
            
                <a href="../../face-cluster/face.html">
            
                    
                        <b>2.6.2.</b>
                    
                    人脸管理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.6.2.1" data-path="../../face-cluster/face/register.html">
            
                <a href="../../face-cluster/face/register.html">
            
                    
                        <b>2.6.2.1.</b>
                    
                    人脸注册
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.2.2" data-path="../../face-cluster/face/search.html">
            
                <a href="../../face-cluster/face/search.html">
            
                    
                        <b>2.6.2.2.</b>
                    
                    人脸搜索
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6.3" >
            
                <span>
            
                    
                        <b>2.6.3.</b>
                    
                    业务改造
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.6.3.1" data-path="../../face-cluster/refactor/face.html">
            
                <a href="../../face-cluster/refactor/face.html">
            
                    
                        <b>2.6.3.1.</b>
                    
                    刷脸开关
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.3.2" data-path="../../face-cluster/refactor/face_login.html">
            
                <a href="../../face-cluster/refactor/face_login.html">
            
                    
                        <b>2.6.3.2.</b>
                    
                    刷脸登录
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6.4" data-path="../../face-cluster/question.html">
            
                <a href="../../face-cluster/question.html">
            
                    
                        <b>2.6.4.</b>
                    
                    问题探讨
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="../../face-platform/">
            
                <a href="../../face-platform/">
            
                    
                        <b>2.7.</b>
                    
                    Pass人脸库建设
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.7.1" data-path="../../face-platform/phase-1.html">
            
                <a href="../../face-platform/phase-1.html">
            
                    
                        <b>2.7.1.</b>
                    
                    一期
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.7.2" data-path="../../face-platform/phase-2.html">
            
                <a href="../../face-platform/phase-2.html">
            
                    
                        <b>2.7.2.</b>
                    
                    二期
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="../../ipv6/">
            
                <a href="../../ipv6/">
            
                    
                        <b>2.8.</b>
                    
                    IPV6兼容改造
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9" >
            
                <span>
            
                    
                        <b>2.9.</b>
                    
                    NA登录重构
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.9.1" data-path="../../nalogin-refactor/">
            
                <a href="../../nalogin-refactor/">
            
                    
                        <b>2.9.1.</b>
                    
                    需求
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.2" data-path="../../nalogin-refactor/experiment.html">
            
                <a href="../../nalogin-refactor/experiment.html">
            
                    
                        <b>2.9.2.</b>
                    
                    新版页面小流量方案
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.3" >
            
                <span>
            
                    
                        <b>2.9.3.</b>
                    
                    接口改造
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.9.3.1" data-path="../../nalogin-refactor/refactor/check.html">
            
                <a href="../../nalogin-refactor/refactor/check.html">
            
                    
                        <b>2.9.3.1.</b>
                    
                    帐号检测
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.3.2" data-path="../../nalogin-refactor/refactor/history.html">
            
                <a href="../../nalogin-refactor/refactor/history.html">
            
                    
                        <b>2.9.3.2.</b>
                    
                    获取登录历史
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.3.3" data-path="../../nalogin-refactor/refactor/sendSMS.html">
            
                <a href="../../nalogin-refactor/refactor/sendSMS.html">
            
                    
                        <b>2.9.3.3.</b>
                    
                    发送短信验证码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.3.4" data-path="../../nalogin-refactor/refactor/smsLogin.html">
            
                <a href="../../nalogin-refactor/refactor/smsLogin.html">
            
                    
                        <b>2.9.3.4.</b>
                    
                    短信登录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.3.5" data-path="../../nalogin-refactor/refactor/login.html">
            
                <a href="../../nalogin-refactor/refactor/login.html">
            
                    
                        <b>2.9.3.5.</b>
                    
                    帐密登录
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.9.4" data-path="../../nalogin-refactor/smarty.html">
            
                <a href="../../nalogin-refactor/smarty.html">
            
                    
                        <b>2.9.4.</b>
                    
                    smarty模板
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="../../login-refactor/">
            
                <a href="../../login-refactor/">
            
                    
                        <b>2.10.</b>
                    
                    登录服务重构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.10.1" data-path="../../login-refactor/api.html">
            
                <a href="../../login-refactor/api.html">
            
                    
                        <b>2.10.1.</b>
                    
                    接口设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.2" data-path="../../login-refactor/server.html">
            
                <a href="../../login-refactor/server.html">
            
                    
                        <b>2.10.2.</b>
                    
                    服务端实现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.3" data-path="../../login-refactor/plan.html">
            
                <a href="../../login-refactor/plan.html">
            
                    
                        <b>2.10.3.</b>
                    
                    开发计划
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="../../portrait-url-refactor/">
            
                <a href="../../portrait-url-refactor/">
            
                    
                        <b>2.11.</b>
                    
                    头像地址重构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="../../portrait-to-bos/">
            
                <a href="../../portrait-to-bos/">
            
                    
                        <b>2.12.</b>
                    
                    头像存储迁移
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.13" data-path="../../log-masking/">
            
                <a href="../../log-masking/">
            
                    
                        <b>2.13.</b>
                    
                    业务日志脱敏
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">[第三章] 服务接入</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../../../open/auth-widget/">
            
                <a href="../../../open/auth-widget/">
            
                    
                        <b>3.1.</b>
                    
                    验证控件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="../../../open/auth-widget/prepare.html">
            
                <a href="../../../open/auth-widget/prepare.html">
            
                    
                        <b>3.1.1.</b>
                    
                    前期准备
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="../../../open/auth-widget/token.html">
            
                <a href="../../../open/auth-widget/token.html">
            
                    
                        <b>3.1.2.</b>
                    
                    AuthToken生成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="../../../open/auth-widget/wap.html">
            
                <a href="../../../open/auth-widget/wap.html">
            
                    
                        <b>3.1.3.</b>
                    
                    NA/WAP端接入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.4" data-path="../../../open/auth-widget/pc.html">
            
                <a href="../../../open/auth-widget/pc.html">
            
                    
                        <b>3.1.4.</b>
                    
                    PC端接入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.5" data-path="../../../open/auth-widget/auth.html">
            
                <a href="../../../open/auth-widget/auth.html">
            
                    
                        <b>3.1.5.</b>
                    
                    合法性校验
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.6" data-path="../../../open/auth-widget/code.html">
            
                <a href="../../../open/auth-widget/code.html">
            
                    
                        <b>3.1.6.</b>
                    
                    附:验证控件SDK源码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../../../open/portrait/">
            
                <a href="../../../open/portrait/">
            
                    
                        <b>3.2.</b>
                    
                    头像接入
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../.." >测试方案</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x63A5;&#x53E3;&#x6D4B;&#x8BD5;"><a name="&#x63A5;&#x53E3;&#x6D4B;&#x8BD5;" class="anchor-navigation-ex-anchor" href="#&#x63A5;&#x53E3;&#x6D4B;&#x8BD5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x63A5;&#x53E3;&#x6D4B;&#x8BD5;</h1>
<table>
<thead>
<tr>
<th style="text-align:left">&#x63A5;&#x53E3;</th>
<th style="text-align:left">URI</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">&#x56DE;&#x6E90;&#x63A5;&#x53E3;</td>
<td style="text-align:left">GET /sys/portrait/item/:sign</td>
</tr>
<tr>
<td style="text-align:left">&#x70ED;&#x95E8;&#x5934;&#x50CF;&#x5217;&#x8868;</td>
<td style="text-align:left">GET /sys/portrait/hotitemlist</td>
</tr>
<tr>
<td style="text-align:left">&#x83B7;&#x53D6;&#x5386;&#x53F2;&#x5934;&#x50CF;</td>
<td style="text-align:left">POST /v3/portrait/sapi/history</td>
</tr>
<tr>
<td style="text-align:left">&#x83B7;&#x53D6;&#x5386;&#x53F2;&#x5934;&#x50CF;</td>
<td style="text-align:left">GET /sys/history</td>
</tr>
<tr>
<td style="text-align:left">&#x6279;&#x91CF;&#x83B7;&#x53D6;&#x5934;&#x50CF;</td>
<td style="text-align:left">GET /sys/mgetinfo</td>
</tr>
<tr>
<td style="text-align:left">&#x83B7;&#x53D6;&#x5934;&#x50CF;</td>
<td style="text-align:left">GET /sys/getinfo?user_id=:uid</td>
</tr>
<tr>
<td style="text-align:left">&#x70ED;&#x95E8;&#x5934;&#x50CF;</td>
<td style="text-align:left">GET /sys/portrait/hotitem/wildkid/:id</td>
</tr>
<tr>
<td style="text-align:left">&#x5220;&#x9664;&#x5934;&#x50CF;</td>
<td style="text-align:left">POST /sys/delete</td>
</tr>
<tr>
<td style="text-align:left">&#x4E0A;&#x4F20;&#x56DE;&#x8C03;</td>
<td style="text-align:left">GET /sys/commit</td>
</tr>
<tr>
<td style="text-align:left">&#x4E0A;&#x4F20;&#x63A5;&#x53E3;</td>
<td style="text-align:left">POST /sys/upload/:sign</td>
</tr>
<tr>
<td style="text-align:left">&#x4E0A;&#x4F20;&#x63A5;&#x53E3;</td>
<td style="text-align:left">POST /upload</td>
</tr>
<tr>
<td style="text-align:left">&#x4E0A;&#x4F20;&#x63A5;&#x53E3;</td>
<td style="text-align:left">POST /wp/v3/portrait/upload?psign=:sign</td>
</tr>
<tr>
<td style="text-align:left">&#x4E0A;&#x4F20;&#x63A5;&#x53E3;</td>
<td style="text-align:left">POST /v2/sapi/center/setportrait</td>
</tr>
<tr>
<td style="text-align:left">&#x9884;&#x89C8;&#x63A5;&#x53E3;</td>
<td style="text-align:left">POST /sys/preview/:sign</td>
</tr>
<tr>
<td style="text-align:left">&#x88C1;&#x526A;&#x5934;&#x50CF;&#x4E0A;&#x4F20;</td>
<td style="text-align:left">GET /sys/corpupload</td>
</tr>
<tr>
<td style="text-align:left">&#x8BBE;&#x7F6E;&#x5386;&#x53F2;&#x5934;&#x50CF;</td>
<td style="text-align:left">GET /sys/sethistoryitem</td>
</tr>
<tr>
<td style="text-align:left">&#x8BBE;&#x7F6E;&#x70ED;&#x95E8;&#x5934;&#x50CF;</td>
<td style="text-align:left">GET /sys/sethotitem</td>
</tr>
</tbody>
</table>
<h1 id="&#x6027;&#x80FD;&#x6D4B;&#x8BD5;"><a name="&#x6027;&#x80FD;&#x6D4B;&#x8BD5;" class="anchor-navigation-ex-anchor" href="#&#x6027;&#x80FD;&#x6D4B;&#x8BD5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6027;&#x80FD;&#x6D4B;&#x8BD5;</h1>
<p><strong>&#x6027;&#x80FD;&#x6307;&#x6807;</strong></p>
<ul>
<li>&#x6307;&#x6807;&#xFF1A;&#x5355;&#x673A;&#x7A33;&#x5B9A;qps&#x3002;</li>
<li>&#x9884;&#x671F;&#xFF1A;&#x5168;&#x7F51;qps&#x5CF0;&#x503C;1.3w&#xFF0C;&#x6839;&#x636E;&#x6D4B;&#x8BD5;&#x7ED3;&#x679C;&#x7ED9;&#x51FA;&#x8FC1;&#x79FB;orp&#x6240;&#x9700;&#x5B9E;&#x4F8B;&#x6570;&#x3002;</li>
</ul>
<p><strong>&#x6D4B;&#x8BD5;&#x73AF;&#x5883;</strong></p>
<ul>
<li>&#x9700;&#x8981;&#x7EBF;&#x4E0A;&#x771F;&#x5B9E;orp&#x73AF;&#x5883;&#x642D;&#x5EFA;&#x6D4B;&#x8BD5;&#x73AF;&#x5883;</li>
<li>&#x9700;&#x8981;&#x540C;&#x673A;&#x623F;&#x7269;&#x7406;&#x673A;&#x6216;&#x8005;orp&#x5B9E;&#x4F8B;&#x53D1;&#x9001;&#x538B;&#x6D4B;&#x8BF7;&#x6C42;&#x3002;</li>
<li>&#x6D4B;&#x8BD5;&#x5355;&#x673A;&#x5355;&#x5B9E;&#x4F8B;&#x3001;&#x5355;&#x673A;&#x591A;&#x5B9E;&#x4F8B;&#x60C5;&#x51B5;&#x3002;</li>
</ul>
<h1 id="&#x6D4B;&#x8BD5;&#x65B9;&#x6848;"><a name="&#x6D4B;&#x8BD5;&#x65B9;&#x6848;" class="anchor-navigation-ex-anchor" href="#&#x6D4B;&#x8BD5;&#x65B9;&#x6848;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6D4B;&#x8BD5;&#x65B9;&#x6848;</h1>
<h2 id="&#x90E8;&#x7F72;&#x65B9;&#x6848;"><a name="&#x90E8;&#x7F72;&#x65B9;&#x6848;" class="anchor-navigation-ex-anchor" href="#&#x90E8;&#x7F72;&#x65B9;&#x6848;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x90E8;&#x7F72;&#x65B9;&#x6848;</h2>
<ul>
<li>&#x57FA;&#x7840;&#x73AF;&#x5883;&#x90E8;&#x7F72;&#xFF0C;PHP5.4&#x5957;&#x9910;</li>
<li>&#x4E1A;&#x52A1;&#x4EE3;&#x7801;&#x90E8;&#x7F72;&#xFF0C;&#x5934;&#x50CF;&#x670D;&#x52A1;&#x6240;&#x6709;&#x6A21;&#x5757;&#x5305;&#x62EC;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x3001;php&#x57FA;&#x7840;&#x5E93;&#x3001;portrait&#x6A21;&#x5757;&#x7B49;&#x5168;&#x90E8;&#x90E8;&#x7F72;&#x3002;</li>
</ul>
<h2 id="&#x6D4B;&#x8BD5;&#x5206;&#x6790;"><a name="&#x6D4B;&#x8BD5;&#x5206;&#x6790;" class="anchor-navigation-ex-anchor" href="#&#x6D4B;&#x8BD5;&#x5206;&#x6790;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6D4B;&#x8BD5;&#x5206;&#x6790;</h2>
<p>&#x7531;&#x4E8E;99.26%&#x7684;&#x6D41;&#x91CF;&#x6E90;&#x4E8E;CDN&#x7684;&#x56DE;&#x6E90;&#x6D41;&#x91CF;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x63A5;&#x53E3;<code>GET /sys/portrait/item/:sign</code>&#xFF0C;&#x56E0;&#x6B64;&#x4E3B;&#x8981;&#x538B;&#x6D4B;&#x91CD;&#x5FC3;&#x4E3A;CDN&#x56DE;&#x6E90;&#x63A5;&#x53E3;&#x3002;&#x538B;&#x6D4B;&#x65F6;&#x957F;&#x4E3A;30&#x5206;&#x949F;&#xFF0C;&#x56E0;&#x6B64;&#x9700;&#x6293;&#x53D6;&#x7EBF;&#x4E0A;30*13000&#x4E2A;&#x8BF7;&#x6C42;&#x4F5C;&#x4E3A;&#x6D41;&#x91CF;&#x56DE;&#x653E;&#x3002;&#x5934;&#x50CF;&#x670D;&#x52A1;&#x8C03;&#x7528;&#x7B2C;&#x4E09;&#x65B9;&#x670D;&#x52A1;hiphtto&#x83B7;&#x53D6;&#x56FE;&#x50CF;&#x4E8C;&#x8FDB;&#x5236;&#x4FE1;&#x606F;&#xFF0C;&#x907F;&#x514D;&#x5BF9;&#x8BE5;&#x7EBF;&#x4E0A;&#x670D;&#x52A1;&#x9020;&#x6210;&#x5F71;&#x54CD;&#xFF0C;&#x9700;&#x8981;&#x8BC4;&#x4F30;&#x8BE5;&#x670D;&#x52A1;&#x4EA4;&#x4E92;&#x548C;&#x5904;&#x7406;&#x8017;&#x65F6;&#xFF0C;mock&#x8BE5;&#x670D;&#x52A1;&#x8FD4;&#x56DE;&#x3002;</p>
<h2 id="&#x6D4B;&#x8BD5;&#x65B9;&#x6CD5;"><a name="&#x6D4B;&#x8BD5;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#&#x6D4B;&#x8BD5;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6D4B;&#x8BD5;&#x65B9;&#x6CD5;</h2>
<ul>
<li>&#x6293;&#x53D6;&#x7EBF;&#x4E0A;40w&#x8BF7;&#x6C42;&#xFF0C;&#x5C06;&#x6240;&#x6709;&#x8BF7;&#x6C42;&#x7684;sign&#x503C;&#x548C;&#x56FE;&#x50CF;&#x4E8C;&#x8FDB;&#x5236;&#x7684;&#x5BF9;&#x5E94;&#x5173;&#x7CFB;&#x5199;&#x5165;&#x6587;&#x4EF6;&#x5F85;&#x67E5;&#x7528;&#x3002;</li>
<li>&#x7EDF;&#x8BA1;hiphtto&#x5904;&#x7406;&#x8017;&#x65F6;&#xFF0C;mock&#x8C03;&#x7528;&#x8BE5;&#x7B2C;&#x4E09;&#x65B9;&#x670D;&#x52A1;&#x3002;</li>
<li>orp&#x5206;&#x522B;&#x90E8;&#x7F72;1&#x4E2A;&#x3001;2&#x4E2A;&#x5B9E;&#x4F8B;&#xFF0C;&#x5728;&#x6D4B;&#x8BD5;&#x673A;&#x5668;&#x4E0A;&#x53D1;&#x538B;&#xFF0C;&#x89C2;&#x5BDF;&#x5934;&#x50CF;&#x670D;&#x52A1;&#x7684;qps&#x3001;&#x8017;&#x65F6;&#x548C;&#x673A;&#x5668;&#x8D44;&#x6E90;&#x5360;&#x7528;&#x60C5;&#x51B5;&#xFF0C;&#x7EDF;&#x8BA1;&#x65E5;&#x5FD7;&#x9519;&#x8BEF;&#x91CF;&#x3002;</li>
<li>orp&#x73AF;&#x5883;&#x6240;&#x5728;&#x7269;&#x7406;&#x673A;&#xFF0C;&#x4E00;&#x822C;&#x90E8;&#x7F72;&#x5B9E;&#x4F8B;&#x6570;&#x4EE5;&#x53CA;&#x90E8;&#x7F72;&#x591A;&#x4E2A;&#x5B9E;&#x4F8B;&#x6570;&#xFF0C;&#x5BF9;&#x670D;&#x52A1;&#x6027;&#x80FD;&#x7684;&#x5F71;&#x54CD;&#x662F;&#x5426;&#x9700;&#x8981;&#x8003;&#x91CF;&#x3002;</li>
</ul>
<h2 id="&#x5177;&#x4F53;&#x5B9E;&#x65BD;"><a name="&#x5177;&#x4F53;&#x5B9E;&#x65BD;" class="anchor-navigation-ex-anchor" href="#&#x5177;&#x4F53;&#x5B9E;&#x65BD;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5177;&#x4F53;&#x5B9E;&#x65BD;</h2>
<p>1&#x3001;&#x4F7F;&#x7528; siege &#x4F5C;&#x4E3A;&#x538B;&#x6D4B;&#x5DE5;&#x5177;&#xFF0C;siege&#x80FD;&#x65B9;&#x4FBF;&#x4ECE;&#x6587;&#x4EF6;&#x88C5;&#x8F7D;url&#x3002;
2&#x3001;&#x4ECE;&#x7EBF;&#x4E0A;&#x91C7;&#x96C6;&#x56DE;&#x6E90;&#x8BF7;&#x6C42;&#xFF0C;&#x628A;&#x56FE;&#x7247;&#x6587;&#x4EF6;&#x5199;&#x5165;&#x786C;&#x76D8;&#xFF0C;&#x540C;&#x65F6;&#x751F;&#x6210;url&#x6587;&#x4EF6;&#x5E76;&#x6253;&#x4E71;&#x987A;&#x5E8F;(delay&#x53C2;&#x6570;&#x4E3A;&#x4ECE;hiphoto&#x4E0B;&#x8F7D;&#x65F6;&#x95F4;&#xFF0C;&#x5FAE;&#x79D2;)&#xFF0C;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre class="language-"><code class="lang-php">http<span class="token punctuation">:</span><span class="token comment">//10.195.79.28:8200/sys/portraitm/item/c7efb4f3d5b9baeacdbc3331385e3b.jpg?delay=3307</span>
http<span class="token punctuation">:</span><span class="token comment">//10.195.79.28:8200/sys/portraitm/item/8e59506f776572d8bcd1a48e25.jpg?delay=59648</span>
http<span class="token punctuation">:</span><span class="token comment">//10.195.79.28:8200/sys/portraitm/item/3f87e69fafe58d97e5be88e5bf99e79a84704d.jpg?delay=4653</span>
http<span class="token punctuation">:</span><span class="token comment">//10.195.79.28:8200/sys/portraitm/item/1927b4f8c4e3d1626269b4f8c4e3b7c95048.jpg?delay=3803</span>
</code></pre>
<p>3&#x3001;mock redis&#x8BBF;&#x95EE;</p>
<pre class="language-"><code class="lang-php"><span class="token comment">// &#x6587;&#x4EF6;&#xFF1A;app/portrait/models/service/page/Item.php LINE:58</span>

<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$_GET</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;delay&apos;</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token variable">$sleep</span> <span class="token operator">=</span> <span class="token function">rand</span><span class="token punctuation">(</span><span class="token number">1000</span><span class="token punctuation">,</span> <span class="token number">1500</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">// &#x8BBF;&#x95EE;redis&#x8017;&#x65F6;1~1.5ms</span>
    <span class="token function">usleep</span><span class="token punctuation">(</span><span class="token variable">$sleep</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token variable">$picture_id</span> <span class="token operator">=</span> <span class="token number">53142549604</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
    <span class="token variable">$picture_id</span> <span class="token operator">=</span> Pass_Base_Loader<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">portraitService</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token function">getPortraitId</span><span class="token punctuation">(</span><span class="token variable">$user_id</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
</code></pre>
<p>4&#x3001;mock hiphoto&#x4E0B;&#x8F7D;&#x6587;&#x4EF6;</p>
<pre class="language-"><code class="lang-php"><span class="token comment">// &#x6587;&#x4EF6;&#xFF1A;app/portrait/actions/Item.php LINE:90</span>

<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token variable">$delay</span> <span class="token operator">=</span> <span class="token variable">$_GET</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;delay&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span><span class="token comment">// &#x539F;&#x7F51;&#x7EDC;&#x4E0B;&#x8F7D;&#x65F6;&#x95F4;(&#x5FAE;&#x79D2;)</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$delay</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token variable">$file</span> <span class="token operator">=</span> <span class="token function">sprintf</span><span class="token punctuation">(</span><span class="token single-quoted-string string">&apos;/home/work/items2/%s&apos;</span><span class="token punctuation">,</span> <span class="token variable">$_GET</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;psign&apos;</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token variable">$start</span> <span class="token operator">=</span> <span class="token function">microtime</span><span class="token punctuation">(</span><span class="token boolean constant">true</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token variable">$body</span> <span class="token operator">=</span> <span class="token function">file_get_contents</span><span class="token punctuation">(</span><span class="token variable">$file</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token variable">$cost</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token function">microtime</span><span class="token punctuation">(</span><span class="token boolean constant">true</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token variable">$start</span><span class="token punctuation">)</span> <span class="token operator">*</span> <span class="token number">1000</span> <span class="token operator">*</span> <span class="token number">1000</span><span class="token punctuation">;</span><span class="token comment">// &#x672C;&#x5730;&#x6587;&#x4EF6;&#x8BFB;&#x53D6;&#x65F6;&#x95F4;</span>
    <span class="token variable">$cost</span> <span class="token operator">=</span> <span class="token function">intval</span><span class="token punctuation">(</span><span class="token variable">$cost</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token variable">$left</span> <span class="token operator">=</span> <span class="token variable">$delay</span> <span class="token operator">-</span> <span class="token variable">$cost</span><span class="token punctuation">;</span><span class="token comment">// &#x7F51;&#x7EDC;&#x4E0B;&#x8F7D;&#x6BD4;&#x672C;&#x5730;&#x6587;&#x4EF6;&#x591A;&#x6D88;&#x8017;&#x65F6;&#x95F4;</span>
    <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$left</span> <span class="token operator">&gt;</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token function">usleep</span><span class="token punctuation">(</span><span class="token variable">$left</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token variable">$size</span> <span class="token operator">=</span> <span class="token function">strlen</span><span class="token punctuation">(</span><span class="token variable">$body</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">header</span><span class="token punctuation">(</span><span class="token single-quoted-string string">&apos;Content-Type: image/jpeg&apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">header</span><span class="token punctuation">(</span><span class="token double-quoted-string string">&quot;Content-Length: <span class="token interpolation"><span class="token variable">$size</span></span>&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">header</span><span class="token punctuation">(</span><span class="token single-quoted-string string">&apos;Portrait_tag: &apos;</span><span class="token punctuation">.</span><span class="token function">md5</span><span class="token punctuation">(</span><span class="token variable">$picture_id</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">header</span><span class="token punctuation">(</span><span class="token double-quoted-string string">&quot;Last-Modified:&quot;</span><span class="token punctuation">.</span><span class="token function">gmdate</span><span class="token punctuation">(</span><span class="token double-quoted-string string">&quot;D, d M Y H:i:s&quot;</span><span class="token punctuation">,</span> <span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">-</span><span class="token number">3600</span><span class="token operator">*</span><span class="token number">24</span><span class="token operator">*</span><span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token double-quoted-string string">&quot; GMT&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">echo</span> <span class="token variable">$body</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> <span class="token keyword">array</span><span class="token punctuation">(</span><span class="token single-quoted-string string">&apos;picsys_get_http_code&apos;</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token number">200</span> <span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;picsys_error_message&apos;</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token single-quoted-string string">&apos;&apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">// &#x76F4;&#x63A5;&#x8FD4;&#x56DE;</span>
<span class="token punctuation">}</span>

<span class="token variable">$output</span> <span class="token operator">=</span> <span class="token function">curl_exec</span><span class="token punctuation">(</span><span class="token variable">$ch</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
</code></pre>
<h2 id="&#x53D1;&#x8D77;&#x538B;&#x6D4B;"><a name="&#x53D1;&#x8D77;&#x538B;&#x6D4B;" class="anchor-navigation-ex-anchor" href="#&#x53D1;&#x8D77;&#x538B;&#x6D4B;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x53D1;&#x8D77;&#x538B;&#x6D4B;</h2>
<pre class="language-"><code class="lang-php">siege <span class="token operator">--</span>concurrent<span class="token operator">=</span><span class="token number">10</span> <span class="token operator">--</span>benchmark <span class="token operator">--</span>file<span class="token operator">=</span>urls<span class="token punctuation">.</span>txt
</code></pre>
<footer class="page-footer-ex"> <span class="page-footer-ex-copyright"> &#xA9; fzu </span> &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; <span class="page-footer-ex-footer-update"> &#x6700;&#x540E;&#x4FEE;&#x6539;: 2020-07-14 </span> </footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="deploy.html" class="navigation navigation-prev " aria-label="Previous page: 服务部署">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="test-result.html" class="navigation navigation-next " aria-label="Next page: 测试结论">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"测试方案","level":"2.4.3","depth":2,"next":{"title":"测试结论","level":"2.4.4","depth":2,"path":"projects/portrait-to-orp/orp/test-result.md","ref":"projects/portrait-to-orp/orp/test-result.md","articles":[]},"previous":{"title":"服务部署","level":"2.4.2","depth":2,"path":"projects/portrait-to-orp/orp/deploy.md","ref":"projects/portrait-to-orp/orp/deploy.md","articles":[]},"dir":"ltr"},"config":{"plugins":["multipart","codeblock-filename","anchor-navigation-ex","page-footer-ex","prism","splitter","custom-js-css","-sharing"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism-okaidia.css"]},"page-footer-ex":{"copyright":"© fzu","markdown":true,"update_format":"YYYY-MM-DD","update_label":"最后修改:"},"splitter":{},"search":{},"multipart":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"codeblock-filename":{},"custom-js-css":{"css":["assets/css/main.css","assets/css/folding-chapters.css"],"js":["assets/js/folding-chapters.js"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":true}},"theme":"default","author":"xiajie <xiajie01@baidu.com>","pdf":{"pageBreaksBefore":"/","headerTemplate":null,"paperSize":"a4","margin":{"right":62,"left":62,"top":36,"bottom":36},"fontSize":12,"fontFamily":"Arial","footerTemplate":null,"chapterMark":"pagebreak","pageNumbers":true},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"isbn":"","variables":{},"title":"Passport业务手册","language":"zh-hans","links":{"sharing":{"all":null,"facebook":null,"google":null,"twitter":null,"weibo":null},"sidebar":{}},"gitbook":"*","description":"Passport业务手册","extension":null},"file":{"path":"projects/portrait-to-orp/orp/test.md","mtime":"2020-07-14T00:09:41.370Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-07-14T00:46:01.528Z"},"basePath":"../../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../../gitbook/gitbook.js"></script>
    <script src="../../../gitbook/theme.js"></script>
    
        
        <script src="../../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-custom-js-css/fc1111ed2beb4b0151beb99a0ab82def-folding-chapters.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

